home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / AMOSList-0497 / AMOSLIST / text0130.txt < prev    next >
Encoding:
Text File  |  1998-06-24  |  1.6 KB  |  55 lines

  1. If anyone is interested, I have almost finished coding a Multi Plot 
  2. command, to add to my Falcon Extension (Available from my web page, read
  3. a previous message). This command has the following capabilites:
  4.  
  5. Syntax:
  6.  
  7. Multi Plot X,Y,N,A
  8.  
  9. X=Starting X Coordinate of where you want to plot to.
  10. Y=Y coordinate of where you want to plot to.
  11. N=Number of pixels you want to plot.
  12. A=Starting address of `colour data' in memory.
  13.  
  14. Let me explain excatly what it does!
  15.  
  16. Say you are doing some sort of minimap. 32x32 pixels for example. Normal code:
  17.  
  18. S=Start(10)      ; Bank 10 will contain your colour data (0-63, example)
  19.  
  20. For Y=0 to 31
  21.    For X=0 to 31
  22.       Plot X,Y,S+Y*32+X
  23.    Next X
  24. Next Y
  25.  
  26. Okay. I know you could optomise that multiplication, and change the plot
  27. command for F Plot, Turbo Plot, Falcon Plot or whatever, but that is not the
  28. point! Using the Multi Plot command, it would be like this:
  29.  
  30. For Y=0 to 31
  31.    Multi Plot X,Y,32,S+Y*32
  32. Next Y
  33.  
  34. Advantages of this method:
  35.  
  36. * Less code = easier to read.
  37. * Don't have to worry about optomisation.
  38. * Since you only call the command once (per line), it only has to find the
  39. screen address once, only has to work out where to start from once, etc.
  40. Rather than 32 times. This simple fact alone, triples the speed!!!!!
  41.  
  42. Interested? Good. It will be available VERY SHORTLY! First, though, I want to
  43. know what features you think I should put in it! (Nothing too difficult). Tell
  44. me if it is worth making the same command, but going down instead of accross
  45. etc. And what you think the syntax should be.
  46.  
  47. Thankyou.
  48.  
  49. -- 
  50. ***************
  51. Falcon Software
  52. ***************
  53.  
  54.  
  55.